package com.mailbox.mailbox.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.mailbox.mailbox.domain.Reply;
import com.mailbox.mailbox.util.ResponseResult;

import java.util.List;


/**
* @author Administrator
* @description 针对表【reply】的数据库操作Service
* @createDate 2022-05-18 17:27:19
*/
public interface ReplyService extends IService<Reply> {
    /**
     * 回复留言
     * @param userId
     * @param replyContent
     * @return
     */
    ResponseResult replyMessage(Integer userId,String replyContent,Integer messageId);

    /**
     * 修改回复过的留言
     * @param replyId
     * @param content
     * @return
     */
    ResponseResult updateReply(Integer replyId,String content);

    /**
     * 删除回复
     * @param replyId
     * @return
     */
    ResponseResult deleteReply(Integer replyId);

    /**
     * 批量删除回复
     * @param replyId
     * @return
     */
    ResponseResult batchDeleteReply(List<Integer> replyId);

    /**
     * 遍历所有回复
     * @param pageNow
     * @param pageSize
     * @return
     */
    ResponseResult findAllReply(Integer pageNow,Integer pageSize);

    /**
     * 模糊查询回复
     * @param keyWord
     * @return
     */
    ResponseResult findReplyByNameLike(Integer pageNow, Integer pageSize,String keyWord);

    /**
     * 查询某个留言下的回复
     * @param messageId
     * @return
     */
    ResponseResult findReplyByMessageId(Integer messageId);

}
